﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using Models;
using BLL;

namespace Dryricenet.houTai
{
    public partial class type_Add : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        //提交
        protected void Add_Button_Click(object sender, EventArgs e)
        {
           
            if (foodTypeBLL.foodCFBLL(txtName.Text.Trim()) == null)
            {
                if (foodTypeBLL.foodAddBLL(txtName.Text.Trim()))
                {
                    Response.Write("<script>alert('添加成功！')</script>");
                }
                else
                {
                    Response.Write("<script>alert('添加失败！')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('此支付方式已存在！。')</script>");
            }
        }
    }
}